<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:if test="${fn:length(eventForm.createdEvents) gt 0}">
	<table class="event-list" cellpadding="0" cellspacing="0">
		<thead>
			<tr>
				<th class="firstcol">
					<fmt:message key="event.number"></fmt:message>
				</th>
				<th class="middlecol">
					<fmt:message key="event.name"></fmt:message>
				</th>
				<th class="middlecol">
					<fmt:message key="event.kind"></fmt:message>
				</th>
				<th class="middlecol">
					<fmt:message key="event.when"></fmt:message>
				</th>
				<th class="lastcol">
					<fmt:message key="event.guests"></fmt:message>
				</th>
			</tr>
		</thead>
		<tbody>
			<c:set var="compteur" value="${1}"></c:set>
		  	<c:forEach items="${eventForm.createdEvents}" var="event">
		  		<tr>
		  			<td class="firstcol">
		  				${compteur}
		  			</td>
		  			<td class="middlecol">
		  				<input type="hidden" name="id" value="${event.id}"/>
		  				${event.name}
		  			</td>
		  			<td class="middlecol">
		  				 &nbsp;
		  			</td>
		  			<td class="middlecol">
		  				 &nbsp;
		  			</td>
		  			<td class="lastcol">
		  				 &nbsp;
		  			</td>
		  		</tr>
		  		<c:set var="compteur" value="${compteur+1}"></c:set>
		  	</c:forEach>
		</tbody>
	</table>
	<div class="pagination">
		<div class="arrow previous" id="list-previous"></div>
		  	
		<div class="arrow next" id="list-next"></div>
	</div>
	<div id="button-delete" class="button-div">
		<span class="button-left"></span>
		<span class="button-center">
			<fmt:message key="event.delete"></fmt:message>
		</span>
		<span class="button-right"></span>
	</div>
</c:if>